<%
# Copyright (C) 2013 - present Instructure, Inc.
#
# This file is part of Canvas.
#
# Canvas is free software: you can redistribute it and/or modify it under
# the terms of the GNU Affero General Public License as published by the Free
# Software Foundation, version 3 of the License.
#
# Canvas is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
# details.
#
# You should have received a copy of the GNU Affero General Public License along
# with this program. If not, see <http://www.gnu.org/licenses/>.
%>

<%# Customer-brandable dashboard right-sidebar logo %>
<% if brand_variable("ic-brand-right-sidebar-logo") != "" %>
<div class="ic-sidebar-logo">
  <%= image_tag(brand_variable("ic-brand-right-sidebar-logo"), :class => "ic-sidebar-logo__image", :alt => "Canvas by Instructure") %>
</div>
<% end %>
<% if planner_enabled? %>
  <div class="Sidebar__TodoListContainer"></div>
<% else %>
  {{> views/courses/to_do_list}}
<% end %>
<% locals = {
    :title => t('coming_up', "Coming Up"),
    :period => :one_week,
    :show_context => true,
    :upcoming => true
  }
%>
{{> views/shared/event_list}}
<% if @show_recent_feedback %>
{{> views/shared/event_list", :object => @recent_feedback, :locals => {:title => t('recent_feedback', "Recent Feedback}}
<% end %>
<div>
  <% if show_user_create_course_button(@current_user) %>
    <button type="button"
            id="start_new_course"
            class="element_toggler btn button-sidebar-wide"
            aria-controls="new_course_form">{{#t}}Start a New Course{{/t}}</button>
    {{> views/shared/new_course_form}}
  <% end %>

  <a href="<%= grades_path %>" class="Button button-sidebar-wide">
  {{#t}}View Grades{{/t}}
  </a>
</div>
